class nis::service{
	if $type_flag == 'nisserv'{
		$pattern = 'ypserv'
	}
	else{
		$pattern = ypbind
	}
	service{'nis':
		ensure => running,
		hasstatus => false,
		hasrestart => true,
		enable	=> true,
		require => Class['nis::config'],
		
		pattern => $pattern
	}
}
